package com.zjq.designpatterns.struct.flyweight.code;/*
 * 版权信息: 北京千⾥马网信科技有限公司</br>
 * Copyright ©2008-2018. All rights reserved. 京ICP备16007318号
 */

/**
 * @author jessie
 * @version 1.0
 * @date 2021/1/23
 */
public class Test {
    private static final String[] departments = {"RD", "QA", "PM", "BD"};

    public static void main(String[] args) {
        for (int i = 0; i < 10; i++) {
            String department = departments[(int) (Math.random()*departments.length)];
            Manager manager = (Manager) EmployeeFactory.getManager(department);
            manager.report();
        }

//
//        Integer a = Integer.valueOf(100);
//        Integer b = Integer.valueOf(100);
//        System.out.println(a==b);  //true
//
//        Integer c = Integer.valueOf(1000);
//        Integer d = Integer.valueOf(1000);
//        System.out.println(c == d);  //false
    }
}
